package com.lagou.sqlSession;

import com.lagou.pojo.Configuration;
import com.lagou.pojo.MappedStatement;

import java.sql.SQLException;
import java.util.List;

public interface Executor {

    public <E> List<E> query(Configuration configuration,MappedStatement mappedStatement,Object... params) throws Exception;

    public boolean insert(Configuration configuration,MappedStatement mappedStatement,Object... params) throws Exception;

    public int update(Configuration configuration,MappedStatement mappedStatement,Object... params) throws Exception;

    // 提交事务
    public void commit() throws SQLException;

    // 混滚事务
    public void rollBack() throws SQLException;
}
